package b2.config
{
	public class MatchConfig
	{
		//报名时间（分钟）
		public static const signUpDuration:int = 5;
		//比赛结束时间（秒）
		public static const endUpDuration:int = 20;
		//自动退出时间（秒）
		public static const quitDuration:int = 10;
		 
		//战役名称
		public var name:String;
		//战役详情
		public var description:String;
		//开始时间
		public var startTime:int;
		//轮数
		public var round:int;
		//一轮的时间（分钟）
		public var roundDuration:int;
		//比赛持续时间（分钟）
		public var duration:int;
		//报名最大人数
		public var maxPlayers:int;
		//战力的下限
		public var fpLimitLow:int;
		//战力的上限
		public var fpLimitUp:int;
		//等级的下限
		public var levelLimitLow:int;
		//等级的上限
		public var levelLimitUp:int;
		//战役索引
		public var campIndex:Array;
		//荣誉奖励
		public var honourAward:Array;
		//石油奖励
		public var oilAward:Array;
		
		public function MatchConfig(matchXML:XML)
		{
			name = matchXML.name;
			description = matchXML.description;
			startTime = matchXML.startTime;
			round = matchXML.round;
			roundDuration = matchXML.roundDuration;
			duration = round * roundDuration + signUpDuration;
			maxPlayers = matchXML.maxPlayers;
			fpLimitLow = matchXML.fpLimit.split(",")[0];
			fpLimitUp = matchXML.fpLimit.split(",")[1];
			levelLimitLow = matchXML.levelLimit.split(",")[0];
			levelLimitUp = matchXML.levelLimit.split(",")[1];
			campIndex = matchXML.campIndex.split(",");
			honourAward = matchXML.honourAward.split(",");
			oilAward = matchXML.oilAward.split(",");
		}

	}
}